home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Examples / constructiveSolidGeometry / BowlingBall.eve < prev    next >
Encoding:
Text File  |  1995-03-22  |  866 b   |  50 lines

  1. # translated from the example on pages129-131 of the RenderMan Companion
  2. #
  3. proc SolidCylinder {radius zMin zMax} {
  4.  
  5.   SolidBegin primitive
  6.     Cylinder $radius $zMin $zMax 360
  7.     Disk $zMax $radius 360 
  8.     Disk $zMin $radius 360 
  9.   SolidEnd
  10. }
  11.  
  12. proc SolidCone {height radius} {
  13.  
  14.   SolidBegin primitive
  15.     Cone $height $radius 360
  16.     Disk 0 $radius 360 
  17.   SolidEnd
  18. }
  19.  
  20.  
  21. proc BowlingBallPlug {} {
  22.  
  23.   SolidBegin union
  24.     SolidCylinder .03 -.3 -.15
  25.     Translate 0 0 -.315
  26.     SolidCone .075 .045
  27.   SolidEnd
  28. }
  29.  
  30.  
  31. set plugColor {.1 .1 .1}
  32.  
  33. startShape BowlingBall
  34.   SolidBegin difference
  35.     SolidBegin primitive
  36.       Sphere .3 -.3 .3 360
  37.     SolidEnd
  38.     SolidBegin union
  39.       Color $plugColor
  40.       Rotate 170 1 0 0
  41.       BowlingBallPlug
  42.       Rotate 30 0 1 0
  43.       BowlingBallPlug
  44.       Rotate 30 1 0 0
  45.       BowlingBallPlug
  46.     SolidEnd
  47.   SolidEnd
  48. endShape
  49.       
  50.